$padding-x-navbar: 26px;
$padding-y-navbar: 13px;
$padding-y-navbar-submenu: 9px;

nav.menu {
  ul {
    list-style: none;

    li {
      a {
        padding: 10px 0;
        display: block;
        position: relative;
        text-align: left;
        border: 1px solid transparent;
        font-weight: $font-weight-bold;
        font-size: 90%;
      }

      &.active a {
        color: $color-2;
        border-left-width: 0;
        border-bottom-color: $color-2;
      }
    }
  }
}

.admin-nav {
  border-right: $border-sidebar;
  background: $color-sidebar-bg;
  z-index: $z-index-navbar-flyout;
}

.admin-nav-header {
  padding: 15px;
  height: 58px; // height of .page-title
  box-sizing: content-box;
  background-color: $color-1;
  border-bottom: 1px solid $color-border;

  a {
    display: inline-block;
    line-height: 58px;
  }

  img {
    vertical-align: middle;
  }
}

.admin-nav-menu {
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  li {
    background: $color-navbar-bg;

    &:hover {
      background: $color-navbar-active-bg;

      > a {
        color: $color-navbar-active;
      }
    }

    &.selected {
      background: $color-navbar-active-bg;

      > a {
        color: $color-navbar-active;
      }
    }

    &.selected li {
      padding-left: 2em;
    }

    &:not(.selected):not(:hover) > ul {
      display: none;
    }

    &:not(.selected) {
      position: relative;

      // flyout nav
      > ul {
        position: absolute;
        top: 0;
        left: 100%;
        width: $width-sidebar-flyout;
        margin-left: 0;
        border: $border-sidebar;
        background: $color-navbar-submenu-bg;
        box-shadow: $box-shadow;
        @include caret($direction: left, $color-caret: $color-navbar-submenu-bg);

      &:before {
        z-index: 1;
        top: 1.5em;
      }
     }
    }
  }

  a {
    display: block;
    padding: $padding-y-navbar $padding-x-navbar;
    color: $color-navbar;
    font-weight: normal;
  }

  .icon_link {
    text-indent: 2em;

    &:before {
      position: absolute;
      left: 1em;
      @include transform(translateX(-50%));
    }
  }

  // until .fa usage is corrected
  .text {
    font-family: $base-font-family;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
  }

  .admin-subnav {
    background: $color-navbar-submenu-bg;
    @include padding($padding-y-navbar - $padding-y-navbar-submenu null);

    li {
      background: $color-navbar-submenu-bg;
    }

    a {
      color: $color-navbar-submenu;
      @include padding($padding-y-navbar-submenu null);

      &:hover {
        color: $color-navbar-submenu-active;
      }
    }

    .selected {
      a {
        color: $color-navbar-submenu-active;
      }
    }
  }
}

.admin-nav-footer {
  background-color: $color-navbar-footer-bg;

  a {
    color: $color-navbar-footer;

    &:hover {
      color: $color-navbar-footer-active;
    }
  }
}

.admin-nav.fits .admin-nav-footer {
  position: fixed;
  bottom: 0;
  width: $width-sidebar;
  border-top: $border-sidebar;
  border-right: $border-sidebar;
}

.admin-login-nav {
  list-style: none;
  margin: 0;
  padding: 1rem 0;

  li {
    padding: 0.3rem 1.2rem;
  }

  a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  i {
    margin-right: 0.5rem;
  }
}
